package com.listening.framework.security;

import java.io.IOException;

import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer;

import com.listening.framework.security.shirofreemarker.ShiroTags;

import freemarker.template.TemplateException;

/**
 * Shiro + Freemarker 使用配置
 * 
 * @author Listening
 * 
 */
public class ShiroTagFreeMarkerConfigurer extends FreeMarkerConfigurer {

	@Override
	public void afterPropertiesSet() throws IOException, TemplateException {
		// TODO Auto-generated method stub
		super.afterPropertiesSet();
		this.getConfiguration().setSharedVariable("shiro", new ShiroTags());
	}

}
